Delayed allocation is a memory management practice that generally splits disk block allocation into two stages. In the first stage, disk space on a storage disk may be reserved for the file data, and the write system call may be returned immediately after copying the data into a cache but before actually writing the data to the storage disk. In the second stage, disk blocks on the storage disk may be allocated to the file when the data is flushed from the cache. The block allocation is usually done by a background thread or scheduler. With this approach, the file system performs a group of extent allocations by combining multiple block allocation requests, potentially reducing file system fragmentation. Fast-moving temporary files, however, often do not have blocks allocated and thus do not add to the file system's fragmentation; by the time the fast-moving files would need allocation, the files have already been removed.
Delayed allocation may solve fragmentation problems on a single storage disk caused by multiple concurrent writers working on multiple files. But in a clustered environment, where multiple nodes are performing write operations, there is a possibility that files may become fragmented even if each node individually delays the block allocation for the writes happening on the node. The instant disclosure, therefore, identifies and addresses a need for systems and methods for managing delayed allocation on clustered file systems.